﻿<Project Sdk="Microsoft.NET.Sdk">

	<PropertyGroup>
		<TargetFrameworks>net10.0-android</TargetFrameworks>
		<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('linux'))">$(TargetFrameworks);net10.0-ios;net10.0-maccatalyst</TargetFrameworks>
		<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>

		<RootNamespace>Paklena_Bašta_TV</RootNamespace>
		<UseMaui>true</UseMaui>
		<SingleProject>true</SingleProject>
		<ImplicitUsings>enable</ImplicitUsings>
		<Nullable>enable</Nullable>

		<!-- Enable XAML source generation for faster build times and improved performance.
		     This generates C# code from XAML at compile time instead of runtime inflation.
		     To disable, remove this line.
		     For individual files, you can override by setting Inflator metadata:
		       <MauiXaml Update="MyPage.xaml" Inflator="Default" /> (reverts to defaults: Runtime for Debug, XamlC for Release)
		       <MauiXaml Update="MyPage.xaml" Inflator="Runtime" /> (force runtime inflation) -->
		<MauiXamlInflator>SourceGen</MauiXamlInflator>

		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
		<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
		<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
	</PropertyGroup>

	<ItemGroup>
	  <!-- Include referenced projects so they build as part of the solution -->
	<ProjectReference Include="Backend\PaklenaBasta.Api\PaklenaBasta.Api.csproj" />
  <ProjectReference Include="PaklenaBasta.Api\PaklenaBasta.Api.csproj" />
	</ItemGroup>

	<!-- Prevent the root aggregator project from accidentally compiling source files from the referenced projects -->
	<ItemGroup>
	  <Compile Remove="Backend\**\*.cs;PaklenaBasta.Api\**\*.cs;PaklenaBasta.MAUI\**\*.cs" />
	  <EmbeddedResource Remove="Backend\**\*;PaklenaBasta.Api\**\*;PaklenaBasta.MAUI\**\*" />
	  <None Remove="Backend\**\*;PaklenaBasta.Api\**\*;PaklenaBasta.MAUI\**\*" />
	</ItemGroup>

	<ItemGroup>
		<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
	</ItemGroup>

	<ItemGroup>
	  <MauiXaml Update="PaklenaBasta.MAUI\App.xaml">
	    <Generator>MSBuild:Compile</Generator>
	  </MauiXaml>
	  <MauiXaml Update="PaklenaBasta.MAUI\Views\HomePage.xaml">
	    <Generator>MSBuild:Compile</Generator>
	  </MauiXaml>
	  <MauiXaml Update="PaklenaBasta.MAUI\Views\LoginPage.xaml">
	    <Generator>MSBuild:Compile</Generator>
	  </MauiXaml>
	  <MauiXaml Update="PaklenaBasta.MAUI\Views\PlayerPage.xaml">
	    <Generator>MSBuild:Compile</Generator>
	  </MauiXaml>
	</ItemGroup>

</Project>
